<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" />
                    </conditions>
                    <action type="Rewrite" url="{R:1}.php" />
                </rule>

                <rule name="Redirect on loja_id" stopProcessing="true">
                    <match url="^(.*)$" />
                        <conditions>
                            <add input="{QUERY_STRING}" pattern="^(.*)loja_id=([^=&amp;]+)&amp;?(.*)$" />
                        </conditions>
                    <action type="Redirect" url="/{R:0}?{C:1}{C:3}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>